package com.newtouch.avmarketing.mgr.modules.avmarkrting.repo;

import com.newtouch.avmarketing.mgr.modules.avmarkrting.entity.Branch;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BranchRepo extends JpaRepository<Branch,Long> {

    @Query(value = "select * from branch b where b.level = 2",nativeQuery = true)
    List<Branch> findByLevel();
}
